package com.ostrich.shopping.room;

import java.util.List;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

/**
 * @Author : yaotianxue
 * @Time : On 2023/9/27 10:49
 * @Description : UserDao
 */
@Dao
public interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(User user);

    @Query("select * from user order by loginTime desc")
    List<User> getAll();
}
